import vtkMouseCameraTrackballPanManipulator from "@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballPanManipulator";
import vtkMouseCameraTrackballRollManipulator from "@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballRollManipulator";
import vtkMouseCameraTrackballRotateManipulator from "@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballRotateManipulator";
import vtkMouseCameraTrackballZoomManipulator from "@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballZoomManipulator";
import vtkMouseCameraTrackballZoomToMouseManipulator from "@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator";
import vtkMouseCameraTrackballMultiRotateManipulator from "@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator";
 
export const keyboardCombination = {
    leftButton: { button: 1, handle: "Rotate" }, // button为1代表左键 handle对应的就是左键要执行的方法
    middleButton: { button: 2, handle: "None" }, // button为2代表中间键
    rightButton: { button: 3, handle: "Pan" }, // button为3代表右键
    shiftLeftButton: { button: 1, shift: true, handle: "Roll" }, // shift默认为false 为true 并且button有值代表组合键，测出代表左边+shift
    shiftMiddleButton: { button: 2, shift: true, handle: "None" },
    shiftRightButton: { button: 3, shift: true, handle: "MultiRotate" },
    controlLeftButton: { button: 1, control: true, handle: "Zoom" },
    controlMiddleButton: { button: 2, control: true, handle: "None" },
    controlRightButton: { button: 3, control: true, handle: "ZoomToMouse" },
    altLeftButton: { button: 1, alt: true, handle: "Zoom" },
    altMiddleButton: { button: 2, alt: true, handle: "None" },
    altRightButton: { button: 3, alt: true, handle: "ZoomToMouse" },
    scrollMiddleButton: {
        scrollEnabled: true,
        dragEnabled: false,
        handle: "Zoom",
    },
    shiftScrollMiddleButton: {
        scrollEnabled: true,
        dragEnabled: false,
        shift: true,
        handle: "None",
    },
    controlScrollMiddleButton: {
        scrollEnabled: true,
        dragEnabled: false,
        control: true,
        handle: "None",
    },
    altScrollMiddleButton: {
        scrollEnabled: true,
        dragEnabled: false,
        alt: true,
        handle: "None",
    },
};
export const manipulatorFactory = {
    // 这里对应的就是我们上面自定义操作杆的handle属性，然后去匹配方法
    None: null,
    Pan: vtkMouseCameraTrackballPanManipulator,
    Zoom: vtkMouseCameraTrackballZoomManipulator,
    Roll: vtkMouseCameraTrackballRollManipulator,
    Rotate: vtkMouseCameraTrackballRotateManipulator,
    MultiRotate: vtkMouseCameraTrackballMultiRotateManipulator,
    ZoomToMouse: vtkMouseCameraTrackballZoomToMouseManipulator,
}